<?php

namespace App\Models\Site;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\SiteApp
 *
 * @property int $id ID
 * @property string|null $uid 版本
 * @property int|null $article_id 文章id
 * @property string|null $summary 更新内容
 * @property string|null $download 下载地址
 * @property \Illuminate\Support\Carbon|null $created_at 创建时间
 * @property \Illuminate\Support\Carbon|null $updated_at 更新时间
 * @property \Illuminate\Support\Carbon|null $deleted_at 删除时间
 * @property int|null $status 状态
 **/
class ArticleReaded extends \App\Models\BasicModel
{
	use HasDateTimeFormatter;

    const UPDATED_AT = null;

    protected $table = 'article_readed';

    public function read($uid,$aid){
        return self::updateOrCreate(['uid'=>$uid,'article_id'=>$aid],['uid'=>$uid,'article_id'=>$aid]);
    }


}
